/*
 * CS_REQ_REMOTE_CONTROL.cpp
 *
 *  Created on: 2013. 10. 31.
 *      Author: jjaehuny
 */


#include "../../Command.h"

#include "../../User.h"

#include "../../NResource/Static.h"

namespace ProjectZ { namespace NCommand {

void Command::CS_REQ_REMOTE_CONTROL(User * pUser, ::Network::Packet * pPacket)
{
	/*
	 * // 서버에서 제어하고자 하는 부분들.
	CS_REQ_REMOTE_CONTROL		0x0214
	{
	}

	SC_RES_REMOTE_CONTROL		0x0215
	{
		s16	ack;
		u8	u8control_1;
		u8	u8control_2;
		u8	u8control_3;
	}
	 */

	PREPARE_PACKET;

	NResource::Circle * pCircle = NResource::Static::Instance().GetCircle();
	if (NULL == pCircle)
	{
		DEBUGLOG("CS_REQ_REMOTE_CONTROL NULL == pCircle");
		return;
	}

	::Network::Packet * pAck = ::Network::GETPACKETPOOL()->SEND_NEW();
	* pAck << static_cast<int16_t>(1)
			<< static_cast<uint8_t>(pCircle->GetData()._front_news_banner)
			<< static_cast<uint8_t>(pCircle->GetData()._top_news_banner)
			<< static_cast<uint8_t>(pCircle->GetData()._cpi_button);
	pAck->MakePacket(CMD_SC_RES_REMOTE_CONTROL);
	pUser->Send(pAck);
}

} /*NCommand*/ } /*ProjectZ*/


